<footer class="container">

  {% include footer-ad.html %}

    <div class="site-footer" role="contentinfo">
        <div class="copyright left mobile-block">
                © {{ site.since }}
                <span title="{{ site.author}}">{{ site.author }}</span>
                <a href="javascript:window.scrollTo(0,0)" class="right mobile-visible">TOP</a>
        </div>

        <ul class="site-footer-links right mobile-hidden">
            <li>
                <a target="_blank" href="http://beian.miit.gov.cn">鄂ICP备12009370号-3</a>
                <a target="_blank" href="http://www.beian.gov.cn/portal/registerSystemInfo?recordcode=42018502003545">鄂公网安备 42018502003545号</a>
                <a href="javascript:window.scrollTo(0,0)" >TOP</a>
            </li>
        </ul>
        <a href="{{ site.github.repository_url }}" target="_blank" aria-label="view source code">
            <span class="mega-octicon octicon-mark-github" title="GitHub"></span>
        </a>
        <ul class="site-footer-links mobile-hidden">
            {% for nav in site.navs %}
            <li>
                <a href="{{ site.url }}{{ nav.href }}" title="{{ nav.label }}" target="{{ nav.target | default: _self }}">{{ nav.label }}</a>
            </li>
            {% endfor %}
            <li><a href="{{ site.url }}{{ site.subscribe_rss }}"><span class="octicon octicon-rss" style="color:orange;"></span></a></li>
        </ul>

      {% include visit-stat.html %}

    </div>
</footer>
<div class="tools-wrapper">
    <a class="gotop" href="#" title="回到顶部"><span class="octicon octicon-arrow-up"></span></a>
</div>
<!-- / footer -->
{% if site.components.share.enabled %}
<script src="{{ assets_base_url }}/assets/vendor/share.js/dist/js/share.min.js"></script>
{% endif %}
<script src="{{ assets_base_url }}/assets/js/geopattern.js"></script>
<script>
  jQuery(document).ready(function($) {
    $('.geopattern').each(function(){
      $(this).geopattern($(this).data('pattern-id'));
    });
   /* hljs.initHighlightingOnLoad(); */
  });
</script>

{% if page.mermaid %}
<script src="{{ assets_base_url }}/assets/js/mermaid.min.js"></script>
<script>mermaid.initialize({startOnLoad:true});</script>
{% endif %}

{% if page.sequence %}
<script src="{{ assets_base_url }}/assets/js/webfont.js"></script>
<script src="{{ assets_base_url }}/assets/js/snap.svg-min.js"></script>
<script src="{{ assets_base_url }}/assets/vendor/underscore/underscore-umd-min.js"></script>
<script src="{{ assets_base_url }}/assets/vendor/js-sequence-diagrams/dist/sequence-diagram-min.js"></script>
<link rel="stylesheet" href="{{ assets_base_url }}/assets/vendor/js-sequence-diagrams/dist/sequence-diagram-min.css">
<script>
  $(".language-sequence").sequenceDiagram({theme: 'simple'});
</script>
{% endif %}

{% if page.flow %}
<script src="{{ assets_base_url }}/assets/js/raphael.min.js"></script>
<script src="{{ assets_base_url }}/assets/vendor/flowchart.js/dist/flowchart.min.js"></script>
<script src="{{ assets_base_url }}/assets/js/flow.js"></script>
{% endif %}

{% if page.mathjax %}
<script type="text/javascript" src="https://cdn.jsdelivr.net/gh/mathjax/MathJax@2.7.5/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
{% endif %}

{% if page.mindmap %}
<link rel="stylesheet" href="{{ assets_base_url }}/assets/vendor/kityminder-core/kityminder.core.css">
<script type="text/javascript" src="{{ assets_base_url }}/assets/vendor/kity/kity.min.js"></script>
<script type="text/javascript" src="{{ assets_base_url }}/assets/vendor/kityminder-core/kityminder.core.min.js"></script>
<script>
$(document).ready(function(){
$('.language-mindmap').each(function(index, element) {
var markdownText = element.textContent.trim();
var parentNode = element.parentNode.parentNode;
var nodeName = '.language-mindmap-' + index;
var node = document.createElement("div");
node.className = 'language-mindmap-' + index;
node.style.height = '' + $(element).height() + 'px';
parentNode.insertBefore(node, element.parentNode);
var minder = new kityminder.Minder({
  renderTo: nodeName
});
minder.importData('markdown', markdownText);
/* minder.disable(); */
minder.execCommand('hand');

var viewerTipNode = document.createElement("a");
viewerTipNode.setAttribute('href', '{{ site.url }}/mindmap-viewer/?data=' + encodeURIComponent(markdownText));
viewerTipNode.setAttribute('target', '_blank');
viewerTipNode.setAttribute('style', 'font-size:0.8rem;font-style:italic;font-color:grey;');
viewerTipNode.innerText = '全屏查看';
parentNode.insertBefore(viewerTipNode, element.parentNode);

element.parentNode.style.display = 'none';

{% if page.mindmap-template %}
setTimeout(function() {
  minder.setTemplate('{{ page.mindmap-template }}');
  minder.refresh();
}, 100);
{% endif %}
});
});
</script>
{% endif %}
{% if page.mindmap2 %}
<script src="https://cdn.jsdelivr.net/npm/d3@6"></script>
<script src="https://cdn.jsdelivr.net/npm/markmap-view"></script>
<script src="https://cdn.jsdelivr.net/npm/markmap-autoloader@0.1.2/dist/index.min.js"></script>
<style>
    .markmap > svg {
      width: 100%;
      height: 100%;
      background: rgba(255, 255, 255, 0.9);
    }
</style>
<script>
    function fullScreen(nodeId) {
        var element= document.getElementById(nodeId);  
        if (window.ActiveXObject) {
            var WsShell = new ActiveXObject('WScript.Shell');
            WsShell.SendKeys('{F11}');
        }
        else if (element.requestFullScreen) {
            element.requestFullScreen();
        }
        else if (element.msRequestFullscreen) {
            element.msRequestFullscreen();
        }
        else if (element.webkitRequestFullScreen) {
            element.webkitRequestFullScreen();
        }
        else if (element.mozRequestFullScreen) {
            element.mozRequestFullScreen();
        }
    }

    function fullExit() {
        var element= document.getElementById("ddd");  
        if (window.ActiveXObject) {
            var WsShell = new ActiveXObject('WScript.Shell');
            WsShell.SendKeys('{F11}');
        }
        else if (element.requestFullScreen) {
            document.exitFullscreen();
        }
        else if (element.msRequestFullscreen) {
            document.msExitFullscreen();
        }
        else if (element.webkitRequestFullScreen) {
            document.webkitCancelFullScreen();
        }
        else if (element.mozRequestFullScreen) {
            document.mozCancelFullScreen();
        }
    }

    function insertAfter(newElement, targetElement) {
        var parent = targetElement.parentNode;
        if (parent.lastChild == targetElement) {
            parent.appendChild(targetElement);
        } else {
            parent.insertBefore(newElement, targetElement.nextSibling);
        }
    }
   
    $(document).ready(function(){
        $('.language-mindmap').each(function(index, element) {
            window.markmap = {
                autoLoader: { manual: false },
            };
            var markdownText = element.textContent.trim();
            var parentNode = element.parentNode.parentNode;
            element.setAttribute('class', "markmap");
            var nodeName = '.language-mindmap-' + index;
            element.setAttribute("id", nodeName);
            var viewerTipNode1 = document.createElement("a");
            viewerTipNode1.appendChild(document.createTextNode("全屏"));
            viewerTipNode1.setAttribute('onclick', 'fullScreen("' + nodeName + '")');
            viewerTipNode1.setAttribute('style', 'font-size:0.8rem;font-style:italic;font-color:grey;');
            viewerTipNode1.setAttribute('href', 'javascript:void(0)');
            insertAfter(viewerTipNode1, element.parentNode);
            var viewerTipNode2 = document.createElement("a");
            viewerTipNode2.appendChild(document.createTextNode("语法提示"));
            viewerTipNode2.setAttribute('href', 'https://markmap.js.org/');
            viewerTipNode2.setAttribute('target', '_blank');
            viewerTipNode2.setAttribute('style', 'font-size:0.8rem;font-style:italic;font-color:grey;padding-left:0.5rem;');
            insertAfter(viewerTipNode2, viewerTipNode1);
        });
    });
</script>
{% endif %}

{% if site.cloudflare.token %}
<div style="display:none">
  <!-- Cloudflare Web Analytics -->
  <script defer src='https://static.cloudflareinsights.com/beacon.min.js' data-cf-beacon='{"token": "{{ site.cloudflare.token }}"}'></script>
  <!-- End Cloudflare Web Analytics -->
</div>
{% endif %}
</body>
</html>
